package boot.demo.event;


import com.google.common.eventbus.Subscribe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class SimpleEventListener02 {
    private final static Logger LOGGER = LoggerFactory.getLogger(SimpleEventListener02.class);

    @Subscribe
    public void doAction(final Integer event) {
        LOGGER.info("SimpleEventListener02 接收到事件{}", event);
    }

    @Subscribe
    public void doAction2(EventA eventA) throws InterruptedException {
//        Thread.sleep(3000);
        LOGGER.info("SimpleEventListener02 接收到事件03 {}", eventA.getMsg());
    }
}
